<table width="100%" border="1" cellpadding="2" cellspacing="0" style="border-collapse: collapse; border-color: #000000">
<?php
$total_query=0;
$total_time=0;
foreach($this->profilers as $key => $profiler)
{
	echo "<tr>";
	echo "<td style=\"font-weight: bold;\">Queries on database: $key</td>";
	echo "<td style=\"font-weight: bold;\">params</td>";
	echo "<td style=\"font-weight: bold\">Time</td>";
	echo "</tr>";
	$query_profiler=$profiler->getQueryProfiles();
	if (!$query_profiler)
	{
		continue;
	}
	for ($i=0; $i<count($query_profiler); $i++)
	{
		echo "<tr>";
		echo "<td>";
		echo $query_profiler[$i]->getQuery();
		echo "</td>";
		echo "<td>";
		echo print_r($query_profiler[$i]->getQueryParams(), true);
		echo "</td>";
		echo "<td>";
		echo number_format($query_profiler[$i]->getElapsedSecs(), 4);
		echo "</td>";
		echo "</tr>";
		$total_time=$total_time + $query_profiler[$i]->getElapsedSecs();
	}
	$total_query=$total_query + count($query_profiler);
}
?>
</table>
<div style="margin-top: 10px; font-weight: bold">Total <?echo $total_query?> query and take <?echo number_format($total_time, 4)?> secs to complete</div>
